﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DptsAndLeaders.ascx.cs" Inherits="DptsAndLeaders" %>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource_dpt" OnRowDataBound="GridView1_RowDataBound" OnRowCommand="GridView1_RowCommand" OnRowUpdating="GridView1_RowUpdating" DataKeyNames="Id,LeaderName">
    <Columns>
        <asp:BoundField DataField="Id" HeaderText="部门编号" ReadOnly="True" />
        <asp:BoundField DataField="Name" HeaderText="部门名称" ReadOnly="True" />
        <asp:BoundField DataField="DepartmentScore" HeaderText="部门自评分" ReadOnly="True" />
        <asp:BoundField DataField="ScoreBySegment" HeaderText="部门评分" />
        <asp:BoundField DataField="LeaderName" HeaderText="部门主管" ReadOnly="True" />
        <asp:TemplateField HeaderText="主管自评分">
            <EditItemTemplate>
                <asp:Label ID="Label2" runat="server"></asp:Label>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="Label2" runat="server"></asp:Label>
            </ItemTemplate>
            <AlternatingItemTemplate>
                <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
            </AlternatingItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="领导评分">
            <EditItemTemplate>
                <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="Label3" runat="server"></asp:Label>
            </ItemTemplate>
            <AlternatingItemTemplate>
                <asp:Label ID="Label3" runat="server" Text="Label"></asp:Label>
            </AlternatingItemTemplate>
        </asp:TemplateField>
        <asp:CommandField ShowEditButton="True" />
    </Columns>
    <FooterStyle CssClass="FooterStyle" />
    <RowStyle CssClass="RowStyle" />
    <EmptyDataRowStyle CssClass="EmptyRowStyle" />
    <PagerStyle CssClass="PagerStyle" />
    <SelectedRowStyle CssClass="SelectedRowStyle" />
    <HeaderStyle CssClass="HeaderStyle" />
    <EditRowStyle CssClass="EditRowStyle" />
    <AlternatingRowStyle CssClass="AltRowStyle" />
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource_dpt" runat="server" SelectMethod="GetDepartmentsByDirector" TypeName="DepartmentDb" UpdateMethod="UpdateDptLeader">
    <SelectParameters>
        <asp:Parameter Name="DirectorSN" />
    </SelectParameters>
</asp:ObjectDataSource>
